<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Reserva_x_cuartoM extends CI_Model {

    public function __construct() {
        $this->load->database();
    }

    public function registrarReserva($idReserva, $idCuarto) {
        $query = "INSERT INTO reserva_x_cuarto VALUES('$idReserva','$idCuarto')";
        return $this->db->query($query);
    }

    public function obtenerDatos($datos, $idReserva) {
        $query = "SELECT $datos FROM reserva_x_cuarto where id_reserva='$idReserva'";
        return $this->db->query($query)->result();
    }

}